<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
<head>
	<title>发货单列表</title>
	<%@include file="/commons/include/get.jsp" %>
	<script type="text/javascript" src="${ctx}/js/calendar/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${ctx}/js/calendar/date.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery/jquery.validate.js"></script>
    <script type="text/javascript" src="${ctx}/js/jquery/jquery.form.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery/jquery.validate.messages_cn.js"></script>
    <script type="text/javascript" src="${ctx}/js/page/mask/mask.js"></script>
	<script type="text/javascript" src="${ctx}/js/include/cp.js"></script>
	<script type="text/javascript">
$(function(){
	jQuery("#listForm").validate(
	{
		rules: {
			
		},
		messages: {
		},
		submitHandler:function(form)
		{
			jQuery(form).ajaxSubmit(_options);
		}
	});
});
_callback = function() {
	parent.callback(true);
}
		//放置脚本
function show() {
	$("#div1").show();
}

function hide(){
	$("#div1").hide();
}

$(function(){
//单击批量复制数据超链接的事件处理
	selectDateMonth($("#acc_period_panel"), $("#acc_period"));
	hide();
	$("#listFormCopyAll").click(function()
	{
		var $arrKeyIndex = $("input[name='keyIndex']:checked");
		//提交到后台服务器进行日志删除批处理的日志编号字符串
		$("#listForm").attr("action","copySendBillOfGoodall.htm");
		var keyIds = 0;
		for( var i = 0;i < $arrKeyIndex.length;i++)
		{
			keyIds++;
		}
		if(keyIds > 0)
		{
			$("#listForm").submit();
			return true;
		}
		else
		{
			alert("请选择记录！");
			return false;
		}
	});
	
});

	</script>
</head> 
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">发货单列表</td>
		<td>
			<div class="menuTool">
			<a class="del"  href="#" onClick="show();">复制</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="queryForm" method="post" action="getCopySendBills.htm">
<table border="0" cellspacing="0" cellpadding="0" class="queryTable">
	<tr>
		<td class="title">发货单号：</td>
		<td class="input"><input id="title" name="send_sn" size="10"  class="input" value="${fn:escapeXml(param.send_sn)}" /></td>
	
		<td class="title">所属订购单号：</td>
		<td class="input"><input id="title" name="order_sn" size="10"  class="input" value="${fn:escapeXml(param.order_sn)}" /></td>
	
		<td class="title">客户代码：</td>
		<td class="input">
		<select id="custom_code" name="custom_code">
				<option value="" >请选择</option>
				 <c:forEach items="${customsList}" var="d" varStatus="status">
					<option value="${d.custom_code}" <c:if test="${d.custom_code==param.custom_code}">selected="selected"</c:if> >${d.custom_code}</option>
				</c:forEach>
		</select>
		</td>
		<td class="query" colspan="2"><input id="_querySubmit_" type="submit" class="button" value="查询" /></td>
	</tr>
</table>
</form>
<div class="line"></div>
<form id="listForm" method="post" action="delSendBills.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr class="list_title">
		<td style="width:3%"><input id="chkall" type="checkbox" /></td>
		<td>发货单号</td>
		<td>所属订购单号</td>
		<td>客户代码</td>
		<td>销售部门代码</td>
		<td>发货的仓库代码</td>
		<td>财务统计核算期</td>
	</tr>
<c:forEach items="${pageModel.result}" var="d" varStatus="status">
	<tr class="${status.index%2==0?'list_even':'list_odd'}">
		<td nowrap="nowrap">
			<c:if test="${d.audit_status==0 || d.acc_status==0}">
			<input name="keyIndex" type="checkbox" value="${d.id}" />
			</c:if>
		</td>
		<td>${fn:escapeXml(d.send_sn)}</td>
		<td>${fn:escapeXml(d.order_sn)}</td>
		<td>${fn:escapeXml(d.custom_code)}</td>
		<td>${fn:escapeXml(d.sell_dep_code)}</td>
		<td>${fn:escapeXml(d.depot_code)}</td>
		<td>${fn:escapeXml(d.acc_period)}</td>
	</tr>
</c:forEach>
</table>
<input id="_submit_" type="submit" style="display:none;" />


<div id="div1" style="left:170px; top:190px; position:absolute; border: 1px solid #8ed1ff;  display:none;">
<table>
<tr>
		<td class="form_title">财务统计核算期：</td>
		<td class="form_input"><input type="hidden" id="acc_period" name="acc_period" value="" /><div id="acc_period_panel"></div></td>
	</tr>

<tr>
		<td class="form_title">调拨部门代码：</td>
		<td class="form_input"><select name="sell_dep_code" id="sell_dep_code">
        <option value="" >请选择</option>
				 <c:forEach items="${departList}" var="d" varStatus="status">
					<option value="${d.dep_code}">${d.dep_code}</option>
				</c:forEach>
	  </select></td>
	</tr>
	<tr>
		<td class="form_title">发货的仓库代码：</td>
		<td class="form_input">
		<select name="depot_code" id="depot_code">
        <option value="" >请选择</option>
				 <c:forEach items="${deportList}" var="d" varStatus="status">
					<option value="${d.depot_code}">${d.depot_code}</option>
				</c:forEach>
	  </select>
	  </td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="button" name="listFormCopyAll" id="listFormCopyAll" value="确认" />
		<input type="button" name="" id="" value="关闭" onClick="hide();" /></td>
	</tr>
</table>
</div>


</form>
<table border="0" cellspacing="0" cellpadding="0" class="bottomTable">
	<tr><td>${pageNav.page}</td></tr>
</table>
</body>
</html>
